package cn.com.connected.base.validate;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import java.lang.annotation.*;

import javax.validation.Constraint;
import javax.validation.Payload;

/**
 * 自定义校验器
 * 校验List<String>中的参数
 * <pre>
 * @ListStringPattern(regexp = "", message = "")
 * </pre>
 * @author rong.e
 *
 */
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {PatternListValidator.class})
public @interface ListStringPattern {

    String regexp() default "";
    String message() default "格式不正确";
    Class<?>[] groups() default { };
    Class<? extends Payload>[] payload() default { };

}